const key = getFilePathStore(import.meta.url)

export const useIndexStore = defineStore(key, {
    state: () => ({
        agreementComponetStore:useAgreementComponetStore(),
        backGroundImageComponentStore:useBackGroundImageComponentStore(),
        footerComponentStore:useFooterComponentStore(),
    }),
    actions: {
        async initStore() {
            await this.agreementComponetStore.initStore();
            await this.backGroundImageComponentStore.initStore();
            await this.footerComponentStore.initStore();
        },
    },
    persist: {
        key: key,
        storage: sessionStorage
    }
})